import HttpKit from '@/utils/http-kit'

export default {
  /**
   * @description 用户获取自己预定的订单列表
   * @param customerId
   * @returns {*}
   */
  getOrderListByCustomerId (customerId) {
    return HttpKit.get('/book/getBooks/' + customerId, {}).then(
      res => res
    )
  },
  /**
   * @description 取消订单
   * @param bookSpotId
   * @returns {Promise<T | never>}
   */
  cancelOrder (bookSpotId) {
    return HttpKit.post('/book/cancel', {
      'contractId': 0,
      'customerId': 0,
      'endDate': '2019-07-22T01:36:12.187Z',
      'id': bookSpotId,
      'sellId': 0,
      'spotId': 0,
      'startDate': '2019-07-22T01:36:12.187Z',
      'status': 'string',
      'workOrderId': 0
    }).then(
      res => res
    )
  }
}
